<html>
<head>
	<META HTTP-EQUIV = "Content-Type" CONTENT = "text/html; CHARSET = utf-8">
	<title>Jsswing FlowLayout Demo</title>
	<link rel = "stylesheet" type = "text/css" href = "ext2/resources/css/ext-all.css" />
	<script type = "text/javascript" src = "ext2/adapter/ext/ext-base.js"></script>
	<script type = "text/javascript" src = "ext2/ext-core-debug.js"></script>
	<script type = "text/javascript" src = "js/jsswing.js"></script>
	<script>
	Ext.BLANK_IMAGE_URL  =  'ext2/resources/images/default/s.gif';
	
	jsw.ROOT_DIR = '.';
	//jsw.debugEnabled = true;
	Ext.onReady(
		function(){
			var doc = jsw.BrowserDocument.getInstance();
			
			var image = new jsw.NetImgLabel(jsw.ROOT_DIR+"/js/img/demo/sample03.jpg");		
			
			var htmlp=new jsw.HTMLPane();
			htmlp.setHTML("<a name=\"Introduction\">Introduction</a></h1><p><a name=\"Introduction\">Do you believe you can write a web page just like writing a Java Swing UI program? Are you a Java Swing fans like me? </a></p><p><a name=\"Introduction\">Yes, we can program a web UI by using Java <tt>Swing</tt> API! And we can make web page look like a java desktop UI at all. </a></p><p><a name=\"Introduction\"><strong>An HTML UI framework</strong> for those Java and javascript developers who are familiar with both Java Swing UI programing and web 2.0 UI programing, let people write their web UI in javascript with the special API which is very similar as Java Swing API( you dont' need to learn more API). It uses parts of Java Swing painting mechanism. </a></p><h1><a name=\"How_to_make_it\">How to make it</a></h1><h2><a name=\"Java_to_Javascript\">Java to Javascript</a></h2><p><a name=\"Java_to_Javascript\">They are two program languages which are so similar. Thus we can write javascript to simulate Java program. Actually I have copied large of code from JDK source code to our framework. </a></p><h2><a name=\"Ext_JS\">Ext JS</a></h2><p><a name=\"Ext_JS\">Ext JS is a very popular web rich UI and Ajax framework, but unfortunately it is under a commercial license from V2.1. Webswing uses Ext JS 2.0 api to implement object-oriented design currently. </a></p><h2><a name=\"Features\">Features</a>");
			
			
			var scrollpane1 = new jsw.ScrollPane(htmlp);
			scrollpane1.setForeground("#ffffff");
			scrollpane1.setBorder(new jsw.border.ShadowBorder());
			scrollpane1.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			doc.add(scrollpane1);
			
			
			var scrollpane2 = new jsw.ScrollPane(image);
			scrollpane2.setBorder(new jsw.border.ShadowBorder());
			scrollpane2.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			//scrollpane2.setMaximumSize({width:200,height:150});
			doc.add(scrollpane2);
			
			
			doc.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/wallpaper.jpg");
			doc.setLayout(new jsw.BoxLayout(doc,jsw.BoxLayout.Y_AXIS));
			jsw.debug(" start visible");
			doc.setVisible(true);//set everything visible
			jsw.debug(" end visible");	
			
			//jsw.debug("preferred h:"+scrollpane.getPreferredSize().height);
			//jsw.debug("min h:"+scrollpane.getMinimumSize().height);
			//jsw.debug("max h:"+scrollpane.getMaximumSize().height);
		});
	</script>
</head>
<body>

</body>
</html>